<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <script src="../js/css.js"></script>
  <link rel="stylesheet" href="../css/style-zj.css">
  <link rel="stylesheet" href="../css/swiper.min.css">
  <!--swiper-css-->
  <style>
    .swiper-pagination-bullet {
      background: #c1c1c1;
    }
    .swiper-pagination-bullet-active {
      opacity: 1;
      background: white;
    }
  </style>
</head>
<body class="bg_fe">
<header><a class="icon_back"></a>云家故事</header>
<div class="head_height"></div>
<div class="container product-detail">
  <div class="png-list pro-det-c">
    <div class="item marb-10" v-for="item in productList" @click="jumpDetail(item.id)">
      <img :src="imgBaseurl + item.picId" alt="">
      <div class="marb-5">{{item.name}}</div>
      <div class="">
        <span class="price-t color-red">￥{{item.nowPrice}}</span>
        <span class="color-gray line-t">￥{{item.price}}</span>
        <span class="fr color-gray1">已售{{item.saleNum}}</span>
      </div>
    </div>
  </div>
</div>

</body>
<script src="../js/config.js"></script>
<script src="../js/swiper.min.js"></script>
<script>

  var storeId = getUrlParam("storeId");
  var limit = 10;
  var page = 1;
  var app = new Vue({
      el: '.product-detail',
      data: {
          imgBaseurl:imgBaseurl,
          productList:'',
      },
      beforeCreate: function () {
          var that = this;
          get_ajax("store/getProdeuctList", {storeId:storeId,limit:limit,page:page}, function (data) {
              var data = data.productList;
              page == 1?app.productList = data:app.productList.push(data);
          });
      },
      updated: function () {

      },
      methods:{
          jumpDetail:function (id) {
              var productId = id;
              location.href='product.html?productId='+productId;
          }
      }
  })
</script>
</html>